package com.gtq.uhome.service.serviceImpl;

import com.gtq.uhome.mapper.SiteHomePageMapper;
import com.gtq.uhome.service.SiteHomePageService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;

/**
 * 站点首页service接口实现类
 */
@Service
public class SiteHomePageServiceImpl implements SiteHomePageService {
    @Resource
    SiteHomePageMapper siteHomePageMapper;
    /**
     * 查询未审核的订单和未派送的订单的数量
     * @return 返回未审核的订单和未派送的订单
     */
    @Override
    public Map<String,Object> selectNotFinished() {
        //查询未派送的订单数,根据是否有派送员ID
        Integer nNelId = siteHomePageMapper.selectNotDelivered();
        //查询未审核滴订单数
        Integer nRevId = siteHomePageMapper.selectNotReviewed();
        Map<String,Object> map=new HashMap<>();
        map.put("notDelivered",nNelId);
        map.put("notReviewed",nRevId);
        return map;
    }
}
